package com.ticketbooking.entity;

import javax.persistence.*;

@Entity
@Table(name = "orderinf",schema = "ticketbooking")
public class OrderInfEntity {
    private String orderid;
    private String routeid;
    private String userid;
    private String seatnum;
    private String fare;
    private String booktime;
    private String state;
    private String deptime;

    @Id
    @Column(name = "orderid")
    public String getOrderid() {
        return orderid;
    }

    public void setOrderid(String orderid) {
        this.orderid = orderid;
    }

    @Basic
    @Column(name = "routeid")
    public String getRouteid() {
        return routeid;
    }

    public void setRouteid(String routeid) {
        this.routeid = routeid;
    }

    @Basic
    @Column(name = "userid")
    public String getUserid() {
        return userid;
    }

    public void setUserid(String userid) {
        this.userid = userid;
    }

    @Basic
    @Column(name = "seatnum")
    public String getSeatnum() {
        return seatnum;
    }

    @Basic
    @Column(name = "fare")
    public String getFare() {
        return fare;
    }

    public void setFare(String fare) {
        this.fare = fare;
    }

    public void setSeatnum(String seatnum) {
        this.seatnum = seatnum;
    }

    @Basic
    @Column(name = "booktime")
    public String getBooktime() {
        return booktime;
    }

    public void setBooktime(String booktime) {
        this.booktime = booktime;
    }

    @Basic
    @Column(name = "state")
    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    @Basic
    @Column(name = "deptime")
    public String getDeptime() {
        return deptime;
    }

    public void setDeptime(String deptime) {
        this.deptime = deptime;
    }

    @Override
    public boolean equals(Object o){
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        OrderInfEntity that = new OrderInfEntity();
        return (orderid != null ? orderid.equals(that.getOrderid()) : that.getOrderid() == null) &&
                (routeid != null ? routeid.equals(that.getRouteid()) : that.getRouteid() == null)&&
                (userid != null ? userid.equals(that.getUserid()) : that.getUserid() == null)&&
                (seatnum != null ? seatnum.equals(that.getSeatnum()) : that.getSeatnum() == null)&&
                (booktime != null ? booktime.equals(that.getBooktime()) : that.getBooktime() == null)&&
                (state != null ? state.equals(that.getState()) : that.getState() == null)&&
                (deptime != null ? deptime.equals(that.getDeptime()) : that.getDeptime() == null);
    }
}
